package com.meilai.project.entity.workflow;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

/**
 * @author 张驰
 * @date 2020/5/28 11:35
 */

@Data
@TableName("wf_check")
@ApiModel(value= "审批记录表")
public class WFCheck {
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "主键，自增列")
    private Long id;

    @ApiModelProperty(value = "流程预设id")
    private Long form_module_default_id;
    @ApiModelProperty(value = "流程数据id")
    private Long wf_data_id;
    @ApiModelProperty(value = "数据表id")
    private Long data_id;
    @ApiModelProperty(value = "节点id")
    private String node_id;
    @ApiModelProperty(value = "节点id")
    private String node_name;
    @ApiModelProperty(value = "审批轮次索引")
    private Long check_index;
    @ApiModelProperty(value = "用户id")
    private Long user_id;
    @ApiModelProperty(value = "类型（1 通过；2 退回；3 重审；4 抄送；5 加审）")
    private Integer type;
    @ApiModelProperty(value = "创建时间")
    private Date create_at;
    @ApiModelProperty(value = "审批意见")
    private String opinion;
    @ApiModelProperty(value = "手写签名图片地址")
    private String sign_url;
    @ApiModelProperty(value = "业务数据记录json")
    private String data_json;

    public WFCheck(Long id, Long wf_data_id) {
        this.id = id;
        this.wf_data_id = wf_data_id;
    }

    public WFCheck(Long form_module_default_id, Long data_id, String node_id, Long user_id, Integer type, String opinion, String sign_url) {
        this.form_module_default_id = form_module_default_id;
        this.data_id = data_id;
        this.node_id = node_id;
        this.user_id = user_id;
        this.type = type;
        this.opinion = opinion;
        this.sign_url = sign_url;
    }

    public WFCheck(Long form_module_default_id, Long data_id, String node_id, Long check_index, Long user_id, Integer type, String opinion, String sign_url) {
        this.form_module_default_id = form_module_default_id;
        this.data_id = data_id;
        this.node_id = node_id;
        this.check_index = check_index;
        this.user_id = user_id;
        this.type = type;
        this.opinion = opinion;
        this.sign_url = sign_url;
    }

    public WFCheck(Long form_module_default_id, Long data_id, String node_id, Long check_index, Long user_id, Integer type, String opinion, String sign_url, String data_json) {
        this.form_module_default_id = form_module_default_id;
        this.data_id = data_id;
        this.node_id = node_id;
        this.check_index = check_index;
        this.user_id = user_id;
        this.type = type;
        this.opinion = opinion;
        this.sign_url = sign_url;
        this.data_json = data_json;
    }

    public WFCheck(Long form_module_default_id, Long data_id, String node_id, String node_name, Long check_index, Long user_id, Integer type, String opinion, String sign_url, String data_json) {
        this.form_module_default_id = form_module_default_id;
        this.data_id = data_id;
        this.node_id = node_id;
        this.node_name = node_name;
        this.check_index = check_index;
        this.user_id = user_id;
        this.type = type;
        this.opinion = opinion;
        this.sign_url = sign_url;
        this.data_json = data_json;
    }

    public WFCheck(Long id, Long form_module_default_id, Long data_id, String node_id, Long check_index, Long user_id, Integer type, Date create_at, String opinion, String sign_url) {
        this.id = id;
        this.form_module_default_id = form_module_default_id;
        this.data_id = data_id;
        this.node_id = node_id;
        this.check_index = check_index;
        this.user_id = user_id;
        this.type = type;
        this.create_at = create_at;
        this.opinion = opinion;
        this.sign_url = sign_url;
    }
}
